using System.ComponentModel;

namespace CodeCoverageDemo;

public class Calculator {
    public int Calculate(int x, int y, Function function) {
        switch (function) {
            case Function.Add:
                return x + y;
            case Function.Subtract:
                return x - y;
            case Function.Multiply:
                return x * y;
            case Function.Divide:
                return x / y;
            default:
                throw new InvalidOperationException();
        }
    }
}